package net.chrone.quickpayapi.service.impl;


import net.chrone.quickpayapi.mapper.NotifyLogMapper;
import net.chrone.quickpayapi.model.NotifyLog;
import net.chrone.quickpayapi.service.NotifyLogService;
import net.chrone.quickpayapi.service.SeqService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("notifyLogService")
public class NotifyLogServiceImpl implements NotifyLogService {
	
	@Autowired
	private NotifyLogMapper notifyLogMapper;
	@Autowired
	private SeqService seqService;

	@Override
	public int insertNotifyLog(String from, String to, String content,String orderNo) {
		NotifyLog log = new NotifyLog();
		log.setId(System.currentTimeMillis()+seqService.updateAndGetSequence("notifyLog", 4));
		log.setFrom(from);
		log.setTo(to);
		log.setOrderNo(orderNo);
		log.setContent(content);
		return notifyLogMapper.insertSelective(log);
	}

}
